package sun.springboot.quartz_scheduler_integrate.core.job;

import lombok.extern.slf4j.Slf4j;
import org.quartz.Job;
import org.quartz.JobDataMap;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * 提示job
 */
@Slf4j
public class TipsJob implements Job {
    Logger logger = LoggerFactory.getLogger(TipsJob.class);

    /**
     * 重写job方法
     */
    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {
        //获取job携带map数据对象
        JobDataMap mergedJobDataMap = context.getMergedJobDataMap();
        logger.info("map对象{}", mergedJobDataMap.get("title").toString());
    }
}
